package com.yc.autouser.controller;

import com.yc.autouser.entity.SysUser;
import com.yc.autouser.service.SysUserService;
import com.yc.common.res.ResultClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname LoginController
 * @Description 登录
 * @Version 1.0.0
 * @Date 2022/7/11 22:57
 * @Created by mikechen
 */
@RestController
@RequestMapping("/autouser")
public class LoginController {
    @Autowired
    private SysUserService service;

    /**
     * 功能描述：登录
     *
     * @author: mikechen
     * @date: 2022/7/11 23:24
     */
    @RequestMapping("/syslogin")
    public ResultClass login(SysUser sysUser) {
        return service.loginUser(sysUser);
    }

    /**
     * 功能描述：登出
     *
     * @author: mikechen
     * @date: 2022/7/11 23:24
     */
    public ResultClass layout() {
        return ResultClass.success();
    }




}
